package com.baizhi.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class SpController {

    @Value("${server.port}")
    private int port;
@GetMapping("sps/{id}")
public String selectSp(@PathVariable("id") Integer id ){
        return  "我是商品服务: 我的端口号："+port+";客户端给我的参数是"+id;
    }
}
